import ClassComponent from "./components/ClassComponent"
import React, { useState } from "react"
import Fun from "./components/FunComponents"

import { TestContext } from './Context'

const App = () => {
    const [name, setName] = useState('张三')

    return <TestContext.Provider value={{name: name, title: '1907A'}}>
        <div>
            <div>类组件内容：<ClassComponent name={name} /></div>
            <button onClick={() => setName('李四')} >改变</button>

            <div>
                函数组件的内容：<Fun />
            </div>
        </div>
    </TestContext.Provider>
}
export default App